home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Behavior Library.cst / 00011_Play Done.ls < prev    next >
Encoding:
Text File  |  1997-05-09  |  1.3 KB  |  56 lines

  1. -- Play Done (Return from Play)
  2.  
  3.  
  4. --  nav
  5. --  playdone, returns playhead to calling movie or frame or marker where play was called.
  6. -- also functions through lingo by handling message 'initPlayDone', 
  7. -- for example if this behavior was assigned to sprite 5, use
  8. -- sendsprite 5, #initPlayDone
  9.  
  10. property whichEvent
  11.  
  12. on initPlayDone me
  13.   init me
  14. end
  15.  
  16. on mouseUp me
  17.   if whichEvent = #mouseup    then init me
  18. end
  19.  
  20. on prepareFrame me
  21.   if whichEvent = #prepareframe then init me
  22. end
  23.  
  24. on exitFrame me
  25.   if whichEvent = #exitframe  then init me
  26. end
  27.  
  28. on init me 
  29.   playdone
  30. end
  31.  
  32.  
  33.  
  34. ---
  35.  
  36. on getPropertyDescriptionList
  37.   
  38.   set p_list = [ ┬¼
  39.     #WhichEvent: [ #comment:  "Initializing Event:", ┬¼
  40.                     #format:   #symbol, ┬¼
  41.                      #range: [ #MouseUp, #PrepareFrame, #ExitFrame, #InitPlayDone], ┬¼
  42.                    #default:   #MouseUp ] ┬¼
  43.                  ]
  44.   return p_list  
  45.   
  46. end
  47.  
  48. on getBehaviorDescription
  49.   return ┬¼
  50. "Returns the Playback Head to the frame where a navigation behavior with the Play Mode parameter set to Play and Return was encountered.  If the current movie was opened with the Play Movie behavior, the original movie reappears." && RETURN & ┬¼
  51. "PARAMETERS:" && RETURN & ┬¼
  52. "ΓÇó Initializing Event - Specify the event that triggers the behavior."
  53.   
  54. end
  55.  
  56.